﻿@model HelpDesk.Models.Ticket

@{
    ViewBag.Title = "Create New Ticket";
    Layout = "~/Views/Shared/_Layout.cshtml";
}



@using (Html.BeginForm())
{
    
    @Html.ValidationSummary(true)

       <div class="control-group">
            @Html.LabelFor(model => model.Title)
            <div class="controls">
                @Html.EditorFor(model => model.Title, new { @class = "input-xxlarge", placeholder = "hola" })
                @Html.ValidationMessageFor(model => model.Title)
            </div>
        </div>

         <div class="control-group">
            @Html.LabelFor(model => model.Description)
            <div class="controls">
                @Html.TextAreaFor(model => model.Description, new { @class = "span12", rows = 5 })
                @Html.ValidationMessageFor(model => model.Description)
                
            </div>
        </div>

       <div class="control-group">
            <label for="Support Staff">Customer</label>
            <div class="controls">
                @Html.Partial("_UserProfileDownPartial", @HelpDesk.Models.HelpDeskDbContext.Instance.UserProfiles.Where(u => u.IsCustomer == true), new ViewDataDictionary { { "ControlID", "Customer" } })
            </div>
        </div>

       <div class="control-group">
            <label for="Support Staff">Support Staff</label>
            <div class="controls">
                @Html.Partial("_UserProfileDownPartial", @HelpDesk.Models.HelpDeskDbContext.Instance.UserProfiles.Where(u => u.IsCustomer == false), new ViewDataDictionary { { "ControlID", "SupportStaff" } })
            </div>
        </div>


        <div class="form-actions">
            <a href="@Url.Action("Index", "Ticket", new { id = @ViewBag.TicketID })" type="button" class="btn">Cancel</a>
            <button type="submit" class="btn btn-primary">Create Ticket</button>
        </div>


}


@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
